package ee.subjects.frontend.controller.command.enterpriseCommands;

import ee.subjects.frontend.controller.command.Command;

public class EnterpriseCommandFactory {

	public Command getCommand(String event){

		Command Command = null;

		try{
			
			if (event.equals("insert_enterprise")){
				Command = new InsertEnterpriseCommand();
			}
			
			if (event.equals("edit_enterprise")){
				Command = new EditEnterpriseCommand();
			}
			
			if (event.equals("validate_enterprise")){
				Command = new ValidateEnterpriseCommand();
			}
			
			if (event.equals("save_enterprise")){
				Command = new SaveEnterpriseCommand();
			}
			
			if (event.equals("allEnterprises")){
				Command = new AllEnterprisesCommand();
			}

		} catch (Exception ex){
			//TODO Logimine
			//MyLogger.Log("AutoCommandFactory.getCommand():",ex.getMessage());
		}
		return Command;
	}

}
